export default {
  data() {
    return {
      conditionOptions: [
        { value: 1, label: '包含' },
        { value: 0, label: '不包含' }
      ],
      condition: this.item.defaultCondition || 1
    };
  },
  watch: {
    condition(newVal, oldVal) {
      if (newVal !== oldVal) {
        this.$set(this.value, this.item.excludeKey, newVal);
      }
    },
    'value': {
      handler(val) {
        // deleteTag时重置包含/不包含下拉项
        this.condition = (val[this.item.excludeKey] || val[this.item.excludeKey] === 0) ? val[this.item.excludeKey] : (this.item.defaultCondition || 1);
      },
      deep: true
    }
  }
};
